import request from '@/utils/request'

// 查询物流记录列表
export function listLogistics(query) {
  return request({
    url: '/source/logistics/list',
    method: 'get',
    params: query
  })
}// 司机
export function deptUser() {
  return request({
    url: '/source/logistics/deptUser',
    method: 'get',
  })
}

// 查询物流记录详细
export function getLogistics(logisticsId) {
  return request({
    url: '/source/logistics/' + logisticsId,
    method: 'get'
  })
}

// 新增物流记录
export function addLogistics(data) {
  return request({
    url: '/source/logistics',
    method: 'post',
    data: data
  })
}

// 修改物流记录
export function updateLogistics(data) {
  return request({
    url: '/source/logistics',
    method: 'put',
    data: data
  })
}

// 删除物流记录
export function delLogistics(logisticsId) {
  return request({
    url: '/source/logistics/' + logisticsId,
    method: 'delete'
  })
}

export function getUserByDept(){
  return request({
    url: '/source/logistics/deptUser',
    method: 'get'
  })
}
